package com.maxlen.coupon.feign;

import com.maxlen.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("store-goods")
public interface GoodsFeignService {

    /**
     * 远程调用：根据Spu id获取SPU图片集合
     * @param spuIds SPUid集合
     * @return
     */
    @PostMapping("/goods/spuimages/getImageBySpuIdList")
    R getImageBySpuIdList(@RequestBody List<Long> spuIds);

    /**
     * 根据分类id获取SPU图片集合
     * @param categoryIds 分类id集合
     * @return
     */
    @PostMapping("/goods/spuimages/getImageByCategoryIdList")
    R getImageByCategoryIdList(@RequestBody List<Long> categoryIds);

    /**
     * 远程调用，根据多个 skuId 获取所有 sku 信息
     * @param skuIdList
     * @return
     */
    @PostMapping("/goods/skuinfo/getSkuInfoBySkuIdList")
    R getSkuInfoBySkuIdList(@RequestBody List<Long> skuIdList);

}
